package com.financing.platform.service.impl;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.financing.platform.dao.IProductSupplierDao;
import com.financing.platform.dto.ProductSupplierDTO;
import com.financing.platform.service.IProductSupplierService;

@Service("productSupplierService")
public class ProductSupplierServiceImpl implements IProductSupplierService{
	
	@Autowired
	private IProductSupplierDao productSupplierDao;
	
	@Override
	public int addProductSupplier(ProductSupplierDTO productSupplierDto) throws SQLException {
		return productSupplierDao.addProductSupplier(productSupplierDto);
	}

	@Override
	public List<ProductSupplierDTO> queryProductSupplier(
			ProductSupplierDTO productSupplierDto) throws SQLException {
		return productSupplierDao.queryProductSupplier(productSupplierDto);
	}

	@Override
	public int editProductSupplier(Map map)
			throws SQLException {
		return productSupplierDao.editProductSupplier(map);
	}

	@Override
	public int queryProductSupplierCount(ProductSupplierDTO productSupplierDto)
			throws SQLException {
		return productSupplierDao.queryProductSupplierCount(productSupplierDto);
	}

	@Override
	public ProductSupplierDTO queryProductSupplierInfo(
			ProductSupplierDTO productSupplierDto) throws SQLException {
		return productSupplierDao.queryProductSupplierInfo(productSupplierDto);
	}

	@Override
	public List<Map<String, Object>> queryProductSupplierInfoEmail()
			throws SQLException {
		return productSupplierDao.queryProductSupplierInfoEmail();
	}

	@Override
	public List<Map<String, Object>> queryProductSupplierEmailById(String id)
			throws SQLException {
		return productSupplierDao.queryProductSupplierEmailById(id);
	}

}
